const express = require('express')
const database = require('../../database')

const router = express.Router()

router.get('/getBlog', (request, response) => {
    const sql = 'select * from blogs'
    database.query(sql, (error, result) => {
        if(error) {
            response.status(417).end()
        } else {
            response.send(result)
        }
    })
})

module.exports = router